cmake_minimum_required(VERSION 3.5)

project(librdkafka_1.9.2_Demo LANGUAGES C CXX)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -fPIC")

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../run)

MESSAGE(STATUS "Project source directory: " ${PROJECT_SOURCE_DIR})
MESSAGE(STATUS "Project binary files output path: " ${PROJECT_BINARY_DIR})
MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH})

set(INCLUDE "${PROJECT_SOURCE_DIR}/include")
set(LIB "${PROJECT_SOURCE_DIR}/lib")
message(STATUS "INCLUDE: ${INCLUDE}")
message(STATUS "LIB: ${LIB}")

add_subdirectory(kconsumer)
add_subdirectory(consumer)
add_subdirectory(producer)